package com.zhoug.common3.view.edit;

import android.content.Context;
import android.text.TextWatcher;
import android.util.AttributeSet;

/**
 * 在列表中的文本输入框EditText
 * @Author 35574
 * @Date 2021/12/31
 * @Description
 */
@Deprecated
public class ListEditText extends androidx.appcompat.widget.AppCompatEditText {
    private TextWatcher listTextWatcher;

    public ListEditText(Context context) {
        super(context);
    }

    public ListEditText(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ListEditText(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }


    @Override
    public void addTextChangedListener(TextWatcher watcher) {
        super.addTextChangedListener(watcher);
        this.listTextWatcher = watcher;
    }

    /**
     * 设置数据之前清除监听
     */
    public void removeListTextWatcher() {
        if (listTextWatcher != null) {
            removeTextChangedListener(listTextWatcher);
        }
    }


}
